<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="utf-8"/>
    <link rel="apple-touch-icon" sizes="76x76" th:href="@{/assets/img/apple-icon.png}">
    <link rel="icon" type="image/png" sizes="96x96" th:href="@{/assets/img/favicon.png}">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

    <title>Paper Dashboard by Creative Tim</title>

    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'/>
    <meta name="viewport" content="width=device-width"/>


    <!-- Bootstrap core CSS     -->
    <link th:href="@{/assets/css/bootstrap.min.css}" rel="stylesheet"/>

    <!-- Animation library for notifications   -->
    <link th:href="@{/assets/css/animate.min.css}" rel="stylesheet"/>

    <!--  Paper Dashboard core CSS    -->
    <link th:href="@{/assets/css/paper-dashboard.css}" rel="stylesheet"/>

    <!--  CSS for Demo Purpose, don't include it in your project     -->
    <link th:href="@{/assets/css/demo.css}" rel="stylesheet"/>

    <!--  Fonts and icons     -->
    <link th:href="@{http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css}" rel="stylesheet">
    <link th:href="@{https://fonts.googleapis.com/css?family=Muli:400,300}" rel='stylesheet' type='text/css'>
    <link th:href="@{/assets/css/themify-icons.css}" rel="stylesheet">

</head>
<body>

<div class="wrapper">
    <div class="sidebar" data-background-color="white" data-active-color="danger">

        <!--
            Tip 1: you can change the color of the sidebar's background using: data-background-color="white | black"
            Tip 2: you can change the color of the active button using the data-active-color="primary | info | success | warning | danger"
        -->

        <div th:replace="~{index::sidebar-wrapper}"></div>
    </div>

    <div class="main-panel">
        <nav class="navbar navbar-default">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle">
                        <span class="icon-bar bar1"></span>
                        <span class="icon-bar bar2"></span>
                        <span class="icon-bar bar3"></span>
                    </button>
                    <a class="navbar-brand" href="#">线路信息</a>
                </div>
                <div class="collapse navbar-collapse">
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="ti-bell"></i>
                                <p class="notification">5</p>
                                <p>收件箱</p>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li><a href="#">新消息 1</a></li>
                                <li><a href="#">新消息 2</a></li>
                                <li><a href="#">新消息 3</a></li>
                                <li><a href="#">新消息 4</a></li>
                                <li><a href="#">更多</a></li>
                            </ul>
                        </li>
                        <li th:replace="~{index::exit}"></li>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>


        <div class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <!--表格导航栏-->

                            <nav class="navbar navbar-inverse " role="navigation">
                                <div class="container-fluid">
                                    <div class="navbar-header">
                                        <a class="navbar-brand" href="#">线路信息</a>
                                    </div>
                                    <div>
                                        <ul class="nav navbar-nav">
                                            <li class="active flag_0"><a href="#">已有线路</a></li>
                                            <li id="up" class="flag_1"><a href="#">运行中</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </nav>
                            <!--表格导航栏-->
                            <div class="content table-responsive table-full-width">
                                <!--<table class="table table-striped">-->
                                    <!--<thead>-->
                                    <!--<th>线路编号</th>-->
                                    <!--<th>创建人</th>-->
                                    <!--<th>创建时间</th>-->
                                    <!--<th>起点站</th>-->
                                    <!--<th>途径站</th>-->
                                    <!--<th>终点站</th>-->
                                    <!--<th>运行时间</th>-->
                                    <!--<th>运行周期</th>-->
                                    <!--<th>操作</th>-->
                                    <!--</thead>-->
                                    <!--<tbody>-->
                                    <!--<tr>-->
                                        <!--<td>1</td>-->
                                        <!--<td>张三</td>-->
                                        <!--<td>2018-03-05</td>-->
                                        <!--<td>陇海路</td>-->
                                        <!--<td>无</td>-->
                                        <!--<td>二七塔</td>-->
                                        <!--<td>7:30&#45;&#45;8:30</td>-->
                                        <!--<td>一周</td>-->
                                        <!--<td><a class="btn" htef="#">发布</a> </td>-->
                                    <!--</tr>-->

                                    <!--</tbody>-->
                                <!--</table>-->
                                <!--<div align="center">-->
                                    <!--<ul class="pagination">-->
                                        <!--<li><a href="#">&laquo;</a></li>-->
                                        <!--<li><a href="#">1</a></li>-->
                                        <!--<li><a href="#">2</a></li>-->
                                        <!--<li><a href="#">3</a></li>-->
                                        <!--<li><a href="#">4</a></li>-->
                                        <!--<li><a href="#">5</a></li>-->
                                        <!--<li><a href="#">&raquo;</a></li>-->
                                    <!--</ul>-->
                                <!--</div>-->
                            </div>
                        </div>
                    </div>


                    <footer th:replace="~{index::footer}"></footer>


                </div>
            </div>
        </div>
    </div>
</div>

</body>

<!--   Core JS Files   -->
<script th:src="@{/assets/js/jquery-1.10.2.js}" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {

        //获取数据加载
        $('div.content.table-responsive.table-full-width').empty();
        var html="<table class='table table-striped'>" +
            "<thead>" +
            "<th>线路编号</th>" +
            " <th>创建人</th>" +
            "<th>创建时间</th>" +
            "<th>起点站</th>" +
            "<th>终点站</th>" +
            "<th>途径站</th>" +
            "<th>运行时间</th>" +
            "<th>运行周期</th>" +
            "<th>操作</th>" +
            "</thead>" +
            "<tbody>" +
            "<tr>" +
            " <td>1</td>" +
            " <td>张三</td>" +
            "<td>2018-03-05</td>" +
            "<td>陇海路</td>"+
            "<td>二七塔</td>" +
            " <td>无</td>" +
            "<td>7:30--8:30</td>" +
            "<td>一周</td>" +
            "<td><a class='btn' htef='#'>发布招募</a> </td>" +
            "</tr>" +
            "</tbody>" +
            "</table>" +
            " <div align='center'>" +
            "<ul class='pagination'>" +
            "<li><a href='#'>首页</a></li>" +
            "<li><a href='#'>上一页</a></li>" +
            "<li><a href='#'>下一页</a></li>" +
            "<li><a href='#'>尾页</a></li>" +
            "<li><a href='#'>第N页/共N页</a></li>" +
            "</ul>" +
            "</div>";
        $('div.content.table-responsive.table-full-width').prepend(html);

        //flag_1 点击运行中
        $('li.flag_1').click(function () {
            $('li.active.flag_0').attr("class","flag_0");
            $('li.flag_1').attr("class","active flag_1");

            $('div.content.table-responsive.table-full-width').empty();
            var html="<table class='table table-striped'>" +
                "<thead>" +
                "<th>线路编号</th>" +
                " <th>创建人</th>" +
                "<th>创建时间</th>" +
                "<th>起点站</th>" +
                "<th>终点站</th>" +
                "<th>途径站</th>" +
                "<th>运行时间</th>" +
                "<th>运行周期</th>" +
                "</thead>" +
                "<tbody>" +
                "<tr>" +
                " <td>1</td>" +
                " <td>张三</td>" +
                "<td>2018-03-05</td>" +
                "<td>陇海路</td>"+
                "<td>二七塔</td>" +
                " <td>无</td>" +
                "<td>7:30--8:30</td>" +
                "<td>一周</td>" +
                "</tr>" +
                "</tbody>" +
                "</table>" +
                " <div align='center'>" +
                "<ul class='pagination'>" +
                "<li><a href='#'>首页</a></li>" +
                "<li><a href='#'>上一页</a></li>" +
                "<li><a href='#'>下一页</a></li>" +
                "<li><a href='#'>尾页</a></li>" +
                "<li><a href='#'>第N页/共N页</a></li>" +
                "</ul>" +
                "</div>";
            $('div.content.table-responsive.table-full-width').prepend(html);
        });

        //flag_0  已有线路
        $('li.flag_0').click(function () {
            $('li.active.flag_1').attr("class","flag_1");
            $('li.flag_0').attr("class","active flag_0");

            $('div.content.table-responsive.table-full-width').empty();
            var html="<table class='table table-striped'>" +
                "<thead>" +
                "<th>线路编号</th>" +
                " <th>创建人</th>" +
                "<th>创建时间</th>" +
                "<th>起点站</th>" +
                "<th>终点站</th>" +
                "<th>途径站</th>" +
                "<th>运行时间</th>" +
                "<th>运行周期</th>" +
                "<th>操作</th>" +
                "</thead>" +
                "<tbody>" +
                "<tr>" +
                " <td>1</td>" +
                " <td>张三</td>" +
                "<td>2018-03-05</td>" +
                "<td>陇海路</td>"+
                "<td>二七塔</td>" +
                " <td>无</td>" +
                "<td>7:30--8:30</td>" +
                "<td>一周</td>" +
                "<td><a class='btn' htef='#'>发布招募</a> </td>" +
                "</tr>" +
                "</tbody>" +
                "</table>" +
                " <div align='center'>" +
                "<ul class='pagination'>" +
                "<li><a href='#'>首页</a></li>" +
                "<li><a href='#'>上一页</a></li>" +
                "<li><a href='#'>下一页</a></li>" +
                "<li><a href='#'>尾页</a></li>" +
                "<li><a href='#'>第N页/共N页</a></li>" +
                "</ul>" +
                "</div>";
            $('div.content.table-responsive.table-full-width').prepend(html);
        });



    });

</script>


<script th:src="@{/assets/js/bootstrap.min.js}" type="text/javascript"></script>

<!--  Checkbox, Radio & Switch Plugins -->
<script th:src="@{/assets/js/bootstrap-checkbox-radio.js}"></script>

<!--  Charts Plugin -->
<script th:src="@{/assets/js/chartist.min.js}"></script>

<!--  Notifications Plugin    -->
<script th:src="@{/assets/js/bootstrap-notify.js}"></script>




</html>

